var PREBID_TIMEOUT = 2000; var FAILSAFE_TIMEOUT = 3000; var REFRESH_TIMEOUT = 60000; // var boturl = window.location.href; const customConfigObjectA = { "buckets" : [{ "precision": 2, //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12 "min" : 0, "max" : 20, "increment" : 0.01 // from $0 to $20, 1-cent increments }] }; var div_1_sizes = [[250, 250], [300, 250], [336, 280]]; var div_2_sizes = [[970, 250], [970, 90]]; var adUnits = []; if (typeof mobileCheck === "function") { if (!mobileCheck()) { if (document.getElementById('quads-ad5')) { adUnits1 = { code: '/21956916242/thebetterindia.com_nb_970x250', mediaTypes: { banner: { sizes: div_2_sizes } }, bids: [ { bidder: 'appnexus', params: { placementId: '19598572' } }, /* one placementId for all sizes my appnexus bidder */ { bidder: 'sovrn', params: {tagid: '744322'} }, { bidder: 'pubmatic', params: { publisherId : '159448', adSlot: '2995934'} }, // { bidder: 'oftmedia', params: { placementId: '18671523' } }, // { bidder: '33across', params: { siteId : 'acSmlCBuar6PWLaKlId8sQ', productId: 'siab' } }, /*All sizes*/ // { bidder: 'emx_digital', params: { tagid: '97458' } }, /* sizeless */ // { bidder: 'openx', params: {unit: '541046026', delDomain: 'yieldbird-d.openx.net'} }, // { bidder: 'rhythmone', params: { placementId: '211538'}}, /* one placementId for all sizes */ { bidder: 'eplanning', params: { ci: '2cfed', ml: '1' } }, { bidder: 'nobid', params: { siteId : '22049999761'} }, { bidder: 'criteo', params: {networkId: '4902'} }, //{ bidder: 'adsolut', params: {zoneId: '107071', host: 'cpm.adsolut.in'} }, // { bidder: 'rubicon', params: {accountId: '11734', siteId: '323604', zoneId: '1680004'} } ] }; adUnits.push(adUnits1); } } else { if (document.getElementById('quads-ad5')) { adUnits1 = { code: '/21956916242/thebetterindia.com_nb_336x280', mediaTypes: { banner: { sizes: div_1_sizes } }, bids: [ { bidder: 'appnexus', params: { placementId: '19598572' } }, /* one placementId for all sizes my appnexus bidder */ { bidder: 'sovrn', params: {tagid: '744318'} }, { bidder: 'pubmatic', params: { publisherId : '159448', adSlot: '2995935'} }, { bidder: 'oftmedia', params: { placementId: '19680399' } }, // { bidder: '33across', params: { siteId : 'acSmlCBuar6PWLaKlId8sQ', productId: 'siab' } }, /*All sizes*/ // { bidder: 'emx_digital', params: { tagid: '97458' } }, /* sizeless */ // { bidder: 'openx', params: {unit: '541046026', delDomain: 'yieldbird-d.openx.net'} }, // { bidder: 'rhythmone', params: { placementId: '211538'}}, /* one placementId for all sizes */ { bidder: 'eplanning', params: { ci: '2cfed', ml: '1' } }, { bidder: 'nobid', params: { siteId : '22049999761'} }, { bidder: 'criteo', params: {networkId: '4902'} }, // //{ bidder: 'adsolut', params: {zoneId: '107071', host: 'cpm.adsolut.in'} }, // { bidder: 'rubicon', params: {accountId: '11734', siteId: '323604', zoneId: '1680004'} } ] }; adUnits.push(adUnits1); } } } // ======== DO NOT EDIT BELOW THIS LINE =========== // var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.pubads().disableInitialLoad(); }); var ubpbjs = ubpbjs || {}; ubpbjs.que = ubpbjs.que || []; ubpbjs.que.push(function() { ubpbjs.addAdUnits(adUnits); ubpbjs.bidderSettings = { 'appnexus': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.86; } }, 'pubmatic': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.74; } }, 'rubicon': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.75; } }, 'openx': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.75; } }, 'criteo': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.75; } }, 'nobid': { bidCpmAdjustment: function(bidCpm){ return bidCpm*1.00; } }, 'oftmedia': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.80; } }, 'sovrn': { bidCpmAdjustment: function(bidCpm){ return bidCpm*0.81; } }, //'adsolut': { bidCpmAdjustment: function(bidCpm){ return bidCpm*1.00; } }, '33across': { bidCpmAdjustment: function(bidCpm){ return bidCpm*1.00; } }, 'emx_digital': { bidCpmAdjustment: function(bidCpm){ return bidCpm*1.00; } }, 'rhythmone': { bidCpmAdjustment: function(bidCpm){ return bidCpm*1.00; } }, 'eplanning': { bidCpmAdjustment: function(bidCpm){ return bidCpm*1.00; } } }; ubpbjs.setConfig({ priceGranularity: customConfigObjectA, //consentManagement: { gdpr: { cmpApi: 'iab', timeout: PREBID_TIMEOUT*400, allowAuctionWithoutConsent: true }, usp: { cmpApi: 'iab', timeout: PREBID_TIMEOUT*400 } }, //cache: {url: "https://prebid.adnxs.com/pbc/v1/cache"}, userSync: { iframeEnabled: true, syncsPerBidder: 999, // and no more than 3 syncs at a time syncDelay: PREBID_TIMEOUT*4, // 5 seconds after the auction filterSettings: { iframe: { bidders: [''], filter: 'exclude' }, image: { bidders: '*', filter: 'include' } }, // enableOverride: true // publisher will call `ubpbjs.triggerUserSyncs()' }, debug: false, useBidCache: true, enableSendAllBids: false, // Default will be `true` as of 1.0 bidderSequence: 'random', // Default is random publisherDomain: 'https://www.thebetterindia.com/', bidderTimeout: PREBID_TIMEOUT+500, //pubcid: {expInterval: }, //currency: { 'adServerCurrency': "GBP", 'granularityMultiplier': 1, 'conversionRateFile': 'https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json', }, }); ubpbjs.requestBids({ bidsBackHandler: initAdserver, timeout: PREBID_TIMEOUT }); }); var mappings = { slots: [], adCode: [], slotNumbers: [], sizes: [], adId: [], renderedFlag: [false, false] }; function ub_checkAdRendered(adId, ub_slot, adCode){ ub_slotNum = ub_slot[ub_slot.length-1]; if(!mappings.renderedFlag[ub_slotNum]){ adId1 = adId; var nodes = document.getElementById(adId1).childNodes[0].childNodes; if(nodes.length && nodes[0].nodeName.toLowerCase() == 'iframe') { setTimeout(function() { refreshBid(ub_slot, adCode); }, REFRESH_TIMEOUT); mappings.renderedFlag[ub_slotNum] = true; } } } function refreshBid(ub_slot, adCode) { ubpbjs.que.push(function(){ ubpbjs.requestBids({ timeout: PREBID_TIMEOUT, adUnitCodes: adCode, bidsBackHandler: function() { googletag.cmd.push(function() { ubpbjs.que.push(function() { ubpbjs.setTargetingForGPTAsync(); googletag.pubads().refresh(ub_slot); }); }); } }); }); } function initAdserver() { if (ubpbjs.initAdserverSet) return; ubpbjs.initAdserverSet = true; googletag.cmd.push(function() { ubpbjs.que.push(function() { ubpbjs.setTargetingForGPTAsync(); googletag.pubads().refresh(mappings.slots); }); }); } function googleDefine(slotNumbers, adCode, sizes, adId){ for(var i=0; i